<?php include_once 'header.php';?>

<style type="text/css">
    	#page	ul {
			overflow:hidden;
		}	
		#page ul li {
			float:left;
			list-style:none;
			margin-right:	20px;
		}
</style>

	<div	id="content">
	<!-- 输出留言板信息到一个列表中 -->
				<ul>
<?php 
	foreach ($msgs as $row){
			echo <<<STR
			<li>
				<a href="view.php?m_id={$row['m_id']}">{$row['m_title']}</a>
				{$row['m_time']}
STR;
			if(false != $logineduser){		//用户处于登录状态
				//若当前留言属于当前用户发表
			echo <<<STR
			<a href="#">编辑</a>
				<a href="#">删除</a>
		 	 </li>
STR;

		} else {
			echo "</li>";
		}
		
	}

?>		
				</ul>
			<div	id="page">
				<?php 
					echo createPage($_SERVER['PHP_SELF'],$currentPage,$currentPage,$pageCount);				
				?>
			</div>
			
	</div>
	
<?php include_once 'footer.php';?>